class SearchController < ApplicationController
  include AuthenticatedSystemBrowse
  
  def q
    @q = params[:k]
    
    if !@q.nil? && @q.size > 0
      @posts = Post.paginate_search(params[:k], {:page => params[:page]})
    else
      redirect_to_referer(:controller => 'browse', :action => 'index')
    end
  end
end
